'''
Created on 2014-2-28

@author: Administrator
'''
import os
def readFile(filename):
    file=open(filename,'r')
#    print(file.read())
    for line in file:
        print(line.strip())#print(line,end = '')
    with open(filename) as f:
            data = f.readlines()
            print(data)
    file.seek(0)
    return file.read()

def writeToFile(filename,content):
    file=open(filename,"w")
    file.write(content)
    file.flush()
    file.close()
    
if __name__ =='__main__':
   print os.path.getsize('__init__.py');
    #content=readFile('mikey.txt')
    #print(content)
   # writeToFile('mikey_copy.txt',content)